.class Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;
.super Landroid/widget/BaseAdapter;
.source "SearchByChangeResultActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "MyAdapter"
.end annotation


# instance fields
.field inflater:Landroid/view/LayoutInflater;

.field solutionList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/Solution;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic this$0:Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity;


# direct methods
.method public constructor <init>(Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity;Landroid/content/Context;Ljava/util/List;)V
    .locals 1
    .parameter
    .parameter "context"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/Solution;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 202
    .local p3, list:Ljava/util/List;,"Ljava/util/List<Lcom/teewoo/app/bus/model/Solution;>;"
    iput-object p1, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity;

    .line 198
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 199
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->inflater:Landroid/view/LayoutInflater;

    .line 200
    iput-object p3, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->solutionList:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 205
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->solutionList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 209
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->solutionList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 213
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 10
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v9, 0x1

    .line 217
    iget-object v6, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->inflater:Landroid/view/LayoutInflater;

    const v7, 0x7f03001d

    .line 218
    const/4 v8, 0x0

    .line 217
    invoke-virtual {v6, v7, v8}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v5

    .line 220
    .local v5, view:Landroid/view/View;
    const v6, 0x7f0a0067

    invoke-virtual {v5, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    .line 219
    check-cast v4, Landroid/widget/TextView;

    .line 221
    .local v4, txView:Landroid/widget/TextView;
    const v6, 0x7f0a0068

    invoke-virtual {v5, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 222
    .local v3, tipView:Landroid/widget/TextView;
    iget-object v6, p0, Lcom/teewoo/app/bus/ui/SearchByChangeResultActivity$MyAdapter;->solutionList:Ljava/util/List;

    invoke-interface {v6, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/teewoo/app/bus/model/Solution;

    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/Solution;->getSections()Ljava/util/List;

    move-result-object v1

    .line 223
    .local v1, sectList:Ljava/util/List;,"Ljava/util/List<Lcom/teewoo/app/bus/model/Section;>;"
    const-string v2, ""

    .line 224
    .local v2, text:Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v6

    if-lt v0, v6, :cond_1

    .line 230
    invoke-virtual {v4, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 231
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v6

    if-lez v6, :cond_0

    .line 232
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v6

    if-ne v6, v9, :cond_3

    .line 233
    const-string v6, "\u76f4\u8fbe"

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 239
    :cond_0
    :goto_1
    return-object v5

    .line 225
    :cond_1
    if-eqz v0, :cond_2

    .line 226
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v7, "\u2192"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 228
    :cond_2
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/teewoo/app/bus/model/Section;

    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/Section;->getLine()Lcom/teewoo/app/bus/model/Line;

    move-result-object v7

    invoke-virtual {v7}, Lcom/teewoo/app/bus/model/Line;->getName()Ljava/lang/String;

    move-result-object v7

    const-string v8, "\\("

    invoke-virtual {v7, v8}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v7

    const/4 v8, 0x0

    aget-object v7, v7, v8

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 224
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 235
    :cond_3
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "\u6362\u4e58"

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 236
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v9

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "\u4e2a"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 237
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v9

    invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    const/high16 v8, -0x1

    .line 235
    invoke-static {v6, v7, v8}, Lcom/teewoo/app/bus/util/Utils;->highlightKeyword(Ljava/lang/String;Ljava/lang/String;I)Landroid/text/SpannableStringBuilder;

    move-result-object v6

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1
.end method
